package classes.multithread;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * @author : DuJiabao
 * @Date : 2021/1/20 15:46
 * @Project : java_learning
 * @File : null.java
 * @Desc :
 */
public class CacheThreadPoolTest {
  public static void main(String[] args) {
    ExecutorService exec = Executors.newCachedThreadPool();
    for (int i = 0; i < 5; i++) {
      exec.execute(new RunnableTask());
    }
    exec.shutdown();
  }
}
